{if condition="$instance['instancestatus'] neq 0"}
    <style>
       .flowcontent input{
           pointer-events: none;
           border: 1px solid #DDD;
            background-color: #F5F5F5;
        }
        .flowcontent select{
           pointer-events: none;
           border: 1px solid #DDD;
            background-color: #F5F5F5;
        }
       .flowcontent textarea{
           pointer-events: none;
           border: 1px solid #DDD;
            background-color: #F5F5F5;
        }
       
    </style>
{/if}
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="flowcontent">
      <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">申请人:</label>
        <div class="col-xs-12 col-sm-8">
             {$originator->nickname}
        </div>
      </div>
          <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Start_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-start_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[start_time]" type="text" value="{$row.start_time}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" data-rule="required" class="form-control editor" rows="5" name="row[content]" cols="50">{$row.content}</textarea>
        </div>
    </div>
   </div>
    {if condition="$instance['instancestatus'] neq 2"}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">审批意见</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-comment" class="form-control" data-use-current="true" name="comment" ></textarea>
        </div>
    </div>
    {/if}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">审批历史</label>
        <div class="col-xs-12 col-sm-8">
            <table class="table table-striped">
            <thead>
                <tr>
                    <td>审批人</td>
                    <td>审批步骤</td>
                    <td>审批意见</td>
                    <td>审批时间</td>
                </tr>
            </thead>
            <tbody>
                {volist name="history" id="vo"  }
                    <tr>
                        <td>{$vo.nickname}</td>
                        <td>{$vo.stepname}</td>                       
                        <td>{$vo.comment}</td>
                        <td>{$vo.completedtime}</td>
                    </tr>
                {/volist}
            </tbody>
        </table>
        </div>
    </div>
    
   <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            {if condition="$mode neq 'view'"}
                {if condition="$instance['instancestatus'] eq 0"}
                  <button type="button" id='start' class="btn btn-success btn-embossed">提交</button>
                {elseif condition="$instance['instancestatus'] eq 1"/}
                <button type="submit" id='agree' class="btn btn-success btn-embossed disabled">{:__('同意')}</button>
                <button type="submit" id='refuse' class="btn btn-danger btn-embossed disabled">{:__('拒绝')}</button>
                {else/}
                {/if}
            {/if}
            {if condition="$instance['instancestatus'] neq 2 and $instance['instancestatus'] neq 3 and $instance['originator'] eq $auth->id"}
                 <button type="submit" id='cancel' class="btn btn-danger btn-embossed disabled">{:__('取消')}</button>
            {/if}
             <button type="button" id='flowchart' class="btn btn-warning btn-embossed">{:__('流程图')}</button>
        </div>
    </div>
    
</form>
